<?php
// +----------------------------------------------------------------------
// | 作者: ZhangXuanNeng <rxthinkcmf@163.com>
// +----------------------------------------------------------------------

namespace app\admin\controller;

use app\admin\service\DefaultConfigService;

/**
 * 默认配置-控制器
 * @author ZhangXuanNeng
 * @since 2024/05/23
 * Class Configdata
 * @package app\admin\controller
 */
class Defaultconfig extends Backend
{
    /**
     * 初始化
     * @author ZhangXuanNeng
     * @since 2024/05/23
     */
    protected function initialize()
    {
        parent::initialize(); // TODO: Change the autogenerated stub
        $this->service = new DefaultConfigService();
    }
    /**
     * 获取指定配置
     * @author ZhangXuanNeng
     * @since 2024/05/23
     */
    public function getDefaultConfig(){
        $result = $this->service->getDefaultConfig();
        return $this->jsonReturn($result);
    }
    /**
     * 保存配置
     * @author ZhangXuanNeng
     * @since 2024/05/23
     */
    public function setDefaultConfig(){
        $result = $this->service->setDefaultConfig();
        return $this->jsonReturn($result);
    }
}